package com.xnyzc.lhy.order.feign.statistics;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.order.entity.gps.OaDVehicleGpsHistory;
import com.xnyzc.lhy.order.feign.fallback.statistics.FeignTrajectoryServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 轨迹服务
 * @author cuixiaojian
 * @date 2020-01-06
 */
@FeignClient(name = "${feign.applicationName.statistics}", fallback = FeignTrajectoryServiceFallback.class)
public interface FeignTrajectoryService {

    /**
     * 订单轨迹保存
     * @param oaDVehicleGpsHistoryList 轨迹集合
     * @return Rv
     */
    @PostMapping(value = "trajectory/saveOrderTrajectory")
    Rv saveOrderTrajectory(@RequestBody List<OaDVehicleGpsHistory> oaDVehicleGpsHistoryList);

    /**
     * 订单轨迹查询
     * @param orderNo
     * @return
     */
    @GetMapping(value = "trajectory/getOrderTrajectory")
    Rv getOrderTrajectory(@RequestParam("orderNo") String orderNo);

}
